package service

// CreateAgentRequest 创建代理请求
type CreateAgentRequest struct {
	Name        string `json:"name" binding:"required"`
	Description string `json:"description"`
	Type        string `json:"type" binding:"required,oneof=conversational task-based autonomous"`
	Config      string `json:"config"`
	Model       string `json:"model" binding:"required"`
	Version     string `json:"version"`
	CreatedBy   uint   `json:"created_by"`
}

// UpdateAgentRequest 更新代理请求
type UpdateAgentRequest struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	Status      string `json:"status" binding:"omitempty,oneof=active inactive training error"`
	Config      string `json:"config"`
	UpdatedBy   uint   `json:"updated_by"`
}

// ListAgentsRequest 获取代理列表请求
type ListAgentsRequest struct {
	Page     int    `form:"page" binding:"min=1"`
	PageSize int    `form:"page_size" binding:"min=1,max=100"`
	Type     string `form:"type"`
	Status   string `form:"status"`
}

// ExecuteAgentRequest 执行代理请求
type ExecuteAgentRequest struct {
	Input  string                 `json:"input" binding:"required"`
	Config map[string]interface{} `json:"config"`
}

// CreateTaskRequest 创建任务请求
type CreateTaskRequest struct {
	AgentID     uint   `json:"agent_id" binding:"required"`
	Name        string `json:"name" binding:"required"`
	Description string `json:"description"`
	Type        string `json:"type" binding:"required,oneof=single recurring conditional"`
	Priority    int    `json:"priority" binding:"min=1,max=5"`
	Input       string `json:"input"`
	Config      string `json:"config"`
	ScheduledAt string `json:"scheduled_at"` // RFC3339格式
	CreatedBy   uint   `json:"created_by"`
}

// UpdateTaskRequest 更新任务请求
type UpdateTaskRequest struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	Priority    int    `json:"priority" binding:"omitempty,min=1,max=5"`
	Status      string `json:"status" binding:"omitempty,oneof=pending running completed failed cancelled"`
	Input       string `json:"input"`
	Config      string `json:"config"`
	ScheduledAt string `json:"scheduled_at"`
	UpdatedBy   uint   `json:"updated_by"`
}

// ListTasksRequest 获取任务列表请求
type ListTasksRequest struct {
	Page     int    `form:"page" binding:"min=1"`
	PageSize int    `form:"page_size" binding:"min=1,max=100"`
	AgentID  uint   `form:"agent_id"`
	Status   string `form:"status"`
	Type     string `form:"type"`
}
